Search
Box.SetPolyShapeArray Method
See Also
 



Sets the shape of box whose style is set to bsPolygon.

 Syntax

VB6  Copy Code

Public Sub SetPolyShapeArray( _
    ByRef psaPoints() As Byte _
)

C++  Copy Code

public:
void SetPolyShapeArray (
    unsigned char** psaPoints
)

 Parameters

psaPoints
An array containing the points coordinates of the custom shape.

 Remarks

Sets the shape for this box, if its type is bsPolygon. You can define whatever custom polygonal form you need and use it. The psaArray parameter sets the (x,y) coordinates of the polygon vertices as percents of the rectangle bounding the form.

 Example

To pass a rectangle use following array: {0, 0, 100, 0, 100, 100, 0, 100}. To pass a rhombus use: {50, 0, 100, 50, 50, 100, 0, 50}. If the user places this rhombus on a position with bounding rectangle (100, 100) - (300, 200) then the rhombus points calculated from the percent array will be (200, 100) - (300, 150) - (200, 200) - (100, 150).

You can define as complex shapes as you wish.

The following C# code illustrates the use of this method:

C#  Copy Code

System.Array bpoints = new byte[] { 0, 0, 100, 100, 0, 100 };

axFlowChart1.Boxes[0].Style = FLOWCHARTLib.EBoxStyle.bsPolygon;
axFlowChart1.Boxes[0].SetPolyShapeArray(ref bpoints);

 See Also